3.4.71 \(\int \frac {\log (c (d+e x^n)^p)}{x (f+g x^n)} \, dx\) [371]

Optimal. Leaf size=121 \[ \frac {\log \left (-\frac {e x^n}{d}\right ) \log \left (c \left (d+e x^n\right )^p\right )}{f n}-\frac {\log \left (c \left (d+e x^n\right )^p\right ) \log \left (\frac {e \left (f+g x^n\right )}{e f-d g}\right )}{f n}-\frac {p \text {Li}_2\left (-\frac {g \left (d+e x^n\right )}{e f-d g}\right )}{f n}+\frac {p \text {Li}_2\left (1+\frac {e x^n}{d}\right )}{f n} \]

[Out]

ln(-e*x^n/d)*ln(c*(d+e*x^n)^p)/f/n-ln(c*(d+e*x^n)^p)*ln(e*(f+g*x^n)/(-d*g+e*f))/f/n-p*polylog(2,-g*(d+e*x^n)/(
-d*g+e*f))/f/n+p*polylog(2,1+e*x^n/d)/f/n

________________________________________________________________________________________

Rubi [A]
time = 0.14, antiderivative size = 121, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 9, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.360, Rules used = {2525, 36, 29, 31, 2463, 2441, 2352, 2440, 2438} \begin {gather*} -\frac {p \text {PolyLog}\left (2,-\frac {g \left (d+e x^n\right )}{e f-d g}\right )}{f n}+\frac {p \text {PolyLog}\left (2,\frac {e x^n}{d}+1\right )}{f n}-\frac {\log \left (c \left (d+e x^n\right )^p\right ) \log \left (\frac {e \left (f+g x^n\right )}{e f-d g}\right )}{f n}+\frac {\log \left (-\frac {e x^n}{d}\right ) \log \left (c \left (d+e x^n\right )^p\right )}{f n} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Log[c*(d + e*x^n)^p]/(x*(f + g*x^n)),x]

[Out]

(Log[-((e*x^n)/d)]*Log[c*(d + e*x^n)^p])/(f*n) - (Log[c*(d + e*x^n)^p]*Log[(e*(f + g*x^n))/(e*f - d*g)])/(f*n)
 - (p*PolyLog[2, -((g*(d + e*x^n))/(e*f - d*g))])/(f*n) + (p*PolyLog[2, 1 + (e*x^n)/d])/(f*n)

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 2352

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(-e^(-1))*PolyLog[2, 1 - c*x], x] /; FreeQ[{c, d, e
}, x] && EqQ[e + c*d, 0]

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 2440

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Dist[1/g, Subst[Int[(a +
 b*Log[1 + c*e*(x/g)])/x, x], x, f + g*x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0] && EqQ[g
 + c*(e*f - d*g), 0]

Rule 2441

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Simp[Log[e*((f + g
*x)/(e*f - d*g))]*((a + b*Log[c*(d + e*x)^n])/g), x] - Dist[b*e*(n/g), Int[Log[(e*(f + g*x))/(e*f - d*g)]/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n}, x] && NeQ[e*f - d*g, 0]

Rule 2463

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((h_.)*(x_))^(m_.)*((f_) + (g_.)*(x_)^(r_.))^(q
_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*Log[c*(d + e*x)^n])^p, (h*x)^m*(f + g*x^r)^q, x], x] /; FreeQ[{a,
 b, c, d, e, f, g, h, m, n, p, q, r}, x] && IntegerQ[m] && IntegerQ[q]

Rule 2525

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))^(q_.)*(x_)^(m_.)*((f_) + (g_.)*(x_)^(s_))^(r_.),
 x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(f + g*x^(s/n))^r*(a + b*Log[c*(d + e*x)^p])^q,
x], x, x^n], x] /; FreeQ[{a, b, c, d, e, f, g, m, n, p, q, r, s}, x] && IntegerQ[r] && IntegerQ[s/n] && Intege
rQ[Simplify[(m + 1)/n]] && (GtQ[(m + 1)/n, 0] || IGtQ[q, 0])

Rubi steps

\begin {align*} \int \frac {\log \left (c \left (d+e x^n\right )^p\right )}{x \left (f+g x^n\right )} \, dx &=\frac {\text {Subst}\left (\int \frac {\log \left (c (d+e x)^p\right )}{x (f+g x)} \, dx,x,x^n\right )}{n}\\ &=\frac {\text {Subst}\left (\int \left (\frac {\log \left (c (d+e x)^p\right )}{f x}-\frac {g \log \left (c (d+e x)^p\right )}{f (f+g x)}\right ) \, dx,x,x^n\right )}{n}\\ &=\frac {\text {Subst}\left (\int \frac {\log \left (c (d+e x)^p\right )}{x} \, dx,x,x^n\right )}{f n}-\frac {g \text {Subst}\left (\int \frac {\log \left (c (d+e x)^p\right )}{f+g x} \, dx,x,x^n\right )}{f n}\\ &=\frac {\log \left (-\frac {e x^n}{d}\right ) \log \left (c \left (d+e x^n\right )^p\right )}{f n}-\frac {\log \left (c \left (d+e x^n\right )^p\right ) \log \left (\frac {e \left (f+g x^n\right )}{e f-d g}\right )}{f n}-\frac {(e p) \text {Subst}\left (\int \frac {\log \left (-\frac {e x}{d}\right )}{d+e x} \, dx,x,x^n\right )}{f n}+\frac {(e p) \text {Subst}\left (\int \frac {\log \left (\frac {e (f+g x)}{e f-d g}\right )}{d+e x} \, dx,x,x^n\right )}{f n}\\ &=\frac {\log \left (-\frac {e x^n}{d}\right ) \log \left (c \left (d+e x^n\right )^p\right )}{f n}-\frac {\log \left (c \left (d+e x^n\right )^p\right ) \log \left (\frac {e \left (f+g x^n\right )}{e f-d g}\right )}{f n}+\frac {p \text {Li}_2\left (1+\frac {e x^n}{d}\right )}{f n}+\frac {p \text {Subst}\left (\int \frac {\log \left (1+\frac {g x}{e f-d g}\right )}{x} \, dx,x,d+e x^n\right )}{f n}\\ &=\frac {\log \left (-\frac {e x^n}{d}\right ) \log \left (c \left (d+e x^n\right )^p\right )}{f n}-\frac {\log \left (c \left (d+e x^n\right )^p\right ) \log \left (\frac {e \left (f+g x^n\right )}{e f-d g}\right )}{f n}-\frac {p \text {Li}_2\left (-\frac {g \left (d+e x^n\right )}{e f-d g}\right )}{f n}+\frac {p \text {Li}_2\left (1+\frac {e x^n}{d}\right )}{f n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.06, size = 92, normalized size = 0.76 \begin {gather*} \frac {\log \left (c \left (d+e x^n\right )^p\right ) \left (\log \left (-\frac {e x^n}{d}\right )-\log \left (\frac {e \left (f+g x^n\right )}{e f-d g}\right )\right )-p \text {Li}_2\left (\frac {g \left (d+e x^n\right )}{-e f+d g}\right )+p \text {Li}_2\left (1+\frac {e x^n}{d}\right )}{f n} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Log[c*(d + e*x^n)^p]/(x*(f + g*x^n)),x]

[Out]

(Log[c*(d + e*x^n)^p]*(Log[-((e*x^n)/d)] - Log[(e*(f + g*x^n))/(e*f - d*g)]) - p*PolyLog[2, (g*(d + e*x^n))/(-
(e*f) + d*g)] + p*PolyLog[2, 1 + (e*x^n)/d])/(f*n)

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 0.78, size = 532, normalized size = 4.40

method result size
risch \(-\frac {\ln \left (\left (d +e \,x^{n}\right )^{p}\right ) \ln \left (f +g \,x^{n}\right )}{n f}+\frac {\ln \left (\left (d +e \,x^{n}\right )^{p}\right ) \ln \left (x^{n}\right )}{n f}-\frac {p \dilog \left (\frac {d +e \,x^{n}}{d}\right )}{f n}-\frac {p \ln \left (x^{n}\right ) \ln \left (\frac {d +e \,x^{n}}{d}\right )}{n f}+\frac {p \dilog \left (\frac {\left (f +g \,x^{n}\right ) e +d g -e f}{d g -e f}\right )}{n f}+\frac {p \ln \left (f +g \,x^{n}\right ) \ln \left (\frac {\left (f +g \,x^{n}\right ) e +d g -e f}{d g -e f}\right )}{n f}+\frac {i \pi \mathrm {csgn}\left (i c \left (d +e \,x^{n}\right )^{p}\right )^{3} \ln \left (f +g \,x^{n}\right )}{2 n f}-\frac {i \pi \mathrm {csgn}\left (i c \left (d +e \,x^{n}\right )^{p}\right )^{3} \ln \left (x^{n}\right )}{2 n f}-\frac {i \pi \,\mathrm {csgn}\left (i \left (d +e \,x^{n}\right )^{p}\right ) \mathrm {csgn}\left (i c \left (d +e \,x^{n}\right )^{p}\right ) \mathrm {csgn}\left (i c \right ) \ln \left (x^{n}\right )}{2 n f}-\frac {i \pi \,\mathrm {csgn}\left (i \left (d +e \,x^{n}\right )^{p}\right ) \mathrm {csgn}\left (i c \left (d +e \,x^{n}\right )^{p}\right )^{2} \ln \left (f +g \,x^{n}\right )}{2 n f}-\frac {i \pi \mathrm {csgn}\left (i c \left (d +e \,x^{n}\right )^{p}\right )^{2} \mathrm {csgn}\left (i c \right ) \ln \left (f +g \,x^{n}\right )}{2 n f}+\frac {i \pi \,\mathrm {csgn}\left (i \left (d +e \,x^{n}\right )^{p}\right ) \mathrm {csgn}\left (i c \left (d +e \,x^{n}\right )^{p}\right )^{2} \ln \left (x^{n}\right )}{2 n f}+\frac {i \pi \mathrm {csgn}\left (i c \left (d +e \,x^{n}\right )^{p}\right )^{2} \mathrm {csgn}\left (i c \right ) \ln \left (x^{n}\right )}{2 n f}+\frac {i \pi \,\mathrm {csgn}\left (i \left (d +e \,x^{n}\right )^{p}\right ) \mathrm {csgn}\left (i c \left (d +e \,x^{n}\right )^{p}\right ) \mathrm {csgn}\left (i c \right ) \ln \left (f +g \,x^{n}\right )}{2 n f}-\frac {\ln \left (c \right ) \ln \left (f +g \,x^{n}\right )}{n f}+\frac {\ln \left (c \right ) \ln \left (x^{n}\right )}{n f}\) \(532\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(ln(c*(d+e*x^n)^p)/x/(f+g*x^n),x,method=_RETURNVERBOSE)

[Out]

-1/n*ln((d+e*x^n)^p)/f*ln(f+g*x^n)+1/n*ln((d+e*x^n)^p)/f*ln(x^n)-1/f*p/n*dilog((d+e*x^n)/d)-1/n*p/f*ln(x^n)*ln
((d+e*x^n)/d)+1/n*p/f*dilog(((f+g*x^n)*e+d*g-e*f)/(d*g-e*f))+1/n*p/f*ln(f+g*x^n)*ln(((f+g*x^n)*e+d*g-e*f)/(d*g
-e*f))+1/2*I/n*Pi*csgn(I*c*(d+e*x^n)^p)^3/f*ln(f+g*x^n)-1/2*I/n*Pi*csgn(I*c*(d+e*x^n)^p)^3/f*ln(x^n)-1/2*I/n*P
i*csgn(I*(d+e*x^n)^p)*csgn(I*c*(d+e*x^n)^p)*csgn(I*c)/f*ln(x^n)-1/2*I/n*Pi*csgn(I*(d+e*x^n)^p)*csgn(I*c*(d+e*x
^n)^p)^2/f*ln(f+g*x^n)-1/2*I/n*Pi*csgn(I*c*(d+e*x^n)^p)^2*csgn(I*c)/f*ln(f+g*x^n)+1/2*I/n*Pi*csgn(I*(d+e*x^n)^
p)*csgn(I*c*(d+e*x^n)^p)^2/f*ln(x^n)+1/2*I/n*Pi*csgn(I*c*(d+e*x^n)^p)^2*csgn(I*c)/f*ln(x^n)+1/2*I/n*Pi*csgn(I*
(d+e*x^n)^p)*csgn(I*c*(d+e*x^n)^p)*csgn(I*c)/f*ln(f+g*x^n)-1/n*ln(c)/f*ln(f+g*x^n)+1/n*ln(c)/f*ln(x^n)

________________________________________________________________________________________

Maxima [A]
time = 0.79, size = 169, normalized size = 1.40 \begin {gather*} n p {\left (\frac {{\left (\log \left (g x^{n} + f\right ) \log \left (\frac {f e + g e^{\left (n \log \left (x\right ) + 1\right )}}{d g - f e} + 1\right ) + {\rm Li}_2\left (-\frac {f e + g e^{\left (n \log \left (x\right ) + 1\right )}}{d g - f e}\right )\right )} e^{\left (-1\right )}}{f n^{2}} - \frac {{\left (\log \left (x^{n}\right ) \log \left (\frac {e^{\left (n \log \left (x\right ) + 1\right )}}{d} + 1\right ) + {\rm Li}_2\left (-\frac {e^{\left (n \log \left (x\right ) + 1\right )}}{d}\right )\right )} e^{\left (-1\right )}}{f n^{2}}\right )} e - {\left (\frac {\log \left (g x^{n} + f\right )}{f n} - \frac {\log \left (x^{n}\right )}{f n}\right )} \log \left ({\left (x^{n} e + d\right )}^{p} c\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*(d+e*x^n)^p)/x/(f+g*x^n),x, algorithm="maxima")

[Out]

n*p*((log(g*x^n + f)*log((f*e + g*e^(n*log(x) + 1))/(d*g - f*e) + 1) + dilog(-(f*e + g*e^(n*log(x) + 1))/(d*g
- f*e)))*e^(-1)/(f*n^2) - (log(x^n)*log(e^(n*log(x) + 1)/d + 1) + dilog(-e^(n*log(x) + 1)/d))*e^(-1)/(f*n^2))*
e - (log(g*x^n + f)/(f*n) - log(x^n)/(f*n))*log((x^n*e + d)^p*c)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*(d+e*x^n)^p)/x/(f+g*x^n),x, algorithm="fricas")

[Out]

integral(log((x^n*e + d)^p*c)/(g*x*x^n + f*x), x)

________________________________________________________________________________________

Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: HeuristicGCDFailed} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(ln(c*(d+e*x**n)**p)/x/(f+g*x**n),x)

[Out]

Exception raised: HeuristicGCDFailed >> no luck

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*(d+e*x^n)^p)/x/(f+g*x^n),x, algorithm="giac")

[Out]

integrate(log((x^n*e + d)^p*c)/((g*x^n + f)*x), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\ln \left (c\,{\left (d+e\,x^n\right )}^p\right )}{x\,\left (f+g\,x^n\right )} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(log(c*(d + e*x^n)^p)/(x*(f + g*x^n)),x)

[Out]

int(log(c*(d + e*x^n)^p)/(x*(f + g*x^n)), x)

________________________________________________________________________________________